package com.lyf.design.learn.j2e.interceptorfilter;

/**
 * @author LYF
 * @date 2022/6/27
 */
public class FilterManager {
    FilterChain filterChain;

    public FilterManager() {
        filterChain = new FilterChain();

        // 动态设置、添加过滤链
        filterChain.addFilter(new AuthFilter());
    }


    /**Target 定义为接口，，请求何种目标，，设置何种请求链 ，，*/
    void filterRequest(String req,Target target){
        filterChain.setTarget(target);
        filterChain.exec(req);
    }
}
